
require 'sinatra'
require 'sinatra/json'
require 'active_record'


ActiveRecord::Base.establish_connection(
  :adapter => "mysql",
  :host    => "localhost",
  :port    => 3316,
  :username => "root",
  :password => "123456",
  :database => "foobar_dev",
  :pool => 10
)

class User < ActiveRecord::Base
  self.table_name = "users"
end

# ActiveRecord::Migration.create_table :users do |t|
#   t.string :name
#   t.string :email
# end

class App < Sinatra::Application

end

get '/' do
  p User.all
  json :foo => 'bar'
end